/*
* Copyright (C) 2012-2014 qar
* License: http://www.gnu.org/licenses/gpl.html GPL version 2
*/

#ifndef HASHFUNCTIONSHA1_H
#define HASHFUNCTIONSHA1_H

#include "crypto/hash/hashfunction.h"

class HashFunctionSha1 : public HashFunction
{
public:
    HashFunctionSha1();
    virtual ~HashFunctionSha1();

    virtual qint64 hashSize() const;
    virtual QString getAlgorithmName() const;

    // Online hash functions
    virtual void reset();
    virtual void addData(const char *data, int length);
    virtual QByteArray result() const;

    // Offline hash functions
    virtual QByteArray offlineHash(const QByteArray &data) const;

protected:
    QCryptographicHash qHasher;

private:
    Q_DISABLE_COPY(HashFunctionSha1)
};

#endif // HASHFUNCTIONSHA1_H
